package com.qtu.order_service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qtu.entity.BmInorderlist;
import com.qtu.order_service.entity.AllOrder;
import com.qtu.order_service.entity.BmmemberOrder;
import com.qtu.order_service.mapper.BmInorderlistMapper;
import com.qtu.order_service.service.BmInorderlistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2020-07-06
 */
@Service
public class BmInorderlistServiceImpl extends ServiceImpl<BmInorderlistMapper, BmInorderlist> implements BmInorderlistService {
    @Autowired
    private BmInorderlistMapper bmInorderlistMapper;

    /**
     * 查询全部订单
     * @return
     */
    @Override
    public List<AllOrder> getAllOrder(Integer sellerId) {
        return bmInorderlistMapper.getAllOrder(sellerId);
    }


    /**
     * 查询待支付订单
     * @param
     * @param
     * @return
     */
    @Override
    public List<AllOrder> getPayment(Integer sellerId) {
        return bmInorderlistMapper.getPayment(sellerId);
    }

    /**
     * 查询待发货订单
     * @param
     * @param
     * @return
     */
    @Override
    public List<AllOrder> getDeliverGoods(Integer sellerId) {
        return bmInorderlistMapper.getDeliverGoods(sellerId);
    }

    /**
     * 查询待收货订单
     * @param
     * @param
     * @return
     */
    @Override
    public List<AllOrder> getReceivingGoods(Integer sellerId) {
        return bmInorderlistMapper.getReceivingGoods(sellerId);
    }

    /**
     * 查询已完成订单
     * @param
     * @param
     * @return
     */
    @Override
    public List<AllOrder> getCompleted(Integer sellerId) {
        return bmInorderlistMapper.getCompleted(sellerId);
    }

    /**
     * 订单详情
     * @param
     * @return
     */
    @Override
    public List<BmmemberOrder> getDetails(Integer orderId) {
        return bmInorderlistMapper.getDetails(orderId);
    }
}
